#pragma once

#include "d3dbase.h"
#include "d3dspriter.h"

// A simple bitmap font implementation.
// A cut-down variant of the DXSDK CD3DFont class.

namespace D3DUtil {

class Font {
	LPDIRECT3DTEXTURE9 m_pTexture;   // The d3d texture for this font
	float   m_fTexCoords[256][4];
	D3DUtil::Spriter *spriter;
public:
	Font();
	// Initializing and destroying device-dependent objects
	void Destroy();
	void Begin(D3DUtil::Spriter &spriter);
	int DrawTextScaled(float x, float y, float z,
	      			   float fXScale, float fYScale, float spacing, unsigned int dwColor,
					   const char *strText, bool center);
	void End();
};

}  // namespace